<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Banner.Master" CodeBehind="list.aspx.vb" Inherits="ETeacherforIELTS.list" 
    title="List" %>
    
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="style.css" rel="stylesheet" type="text/css" />
         
    </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table  class="bgStyle">
    <tr>
        <td class="sides">
            &nbsp;</td>
        <td class="listView">
            <table cellpadding="7" class="innerTable" style="border: thin dashed #C0C0C0">
                <tr>
                    <td class="HeadingStyle" valign="bottom" >
                        Featured articles</td>
                </tr>
                <tr>
                    <td valign="top">
                        <asp:Panel ID="Panel1" runat="server" 
                            BackColor="White" BorderColor="White" >
                            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                                AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlIELTSdata" 
                                BorderColor="#999999" BorderStyle="Solid" PageSize="5" CssClass="innerTable" >
                                <Columns>
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                            <table class="databoundStyle" >
                                            <tr>
                                                                <td>
                                                                    &nbsp;</td>
                                                            </tr>
                                                <tr>
                                                    <td >
                                                        <asp:Image ID="img_Picture" runat="server" Height="89px" 
                                                            ImageUrl='<%#Eval("Picture") %>' Width="108px" />
                                                    </td>
                                                    <td rowspan="3">
                                                        <table class="databoundStyle">
                                                            <tr>
                                                                <td>
                                                                    <asp:Label ID="Label1" runat="server" Text="Title : " CssClass="TitleStyle" 
                                                                        ></asp:Label>
                                                                    <asp:Label ID="lbl_MaterialName" runat="server" 
                                                                        text='<%# Eval("MaterialName") %>' CssClass="databoundStyle"  
                                                                        ForeColor="Gray" ></asp:Label>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    <asp:Label ID="Label2" runat="server" Text="Category : " CssClass="TitleStyle" 
                                                                        ></asp:Label>
                                                                         <asp:Label ID="lbl_Category" runat="server" Text='<%# Eval("Category") %>' 
                                                                        CssClass="databoundStyle"  
                                                                        ForeColor="Gray" ></asp:Label>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                     <asp:Label ID="Label3" runat="server" Text="Stars : " CssClass="TitleStyle" 
                                                                        ></asp:Label>
                                                                    <asp:Label ID="Label4" runat="server" 
                                                                        text='<%# Eval("Stars") %>' CssClass="databoundStyle"  
                                                                        ForeColor="Gray" ></asp:Label>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                             <asp:Label ID="Label5" runat="server" Text="Visited Count : " CssClass="TitleStyle" 
                                                                        ></asp:Label>
                                                                    <asp:Label ID="Label6" runat="server" 
                                                                        text='<%# Eval("VisitedCount") %>' CssClass="databoundStyle"  
                                                                        ForeColor="Gray" ></asp:Label>
                                                               </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                                
                                                <tr>
                                                    <td>
                                                        by&nbsp;&nbsp;
                                                        <asp:Label ID="Label7" runat="server" Text='<%# Eval("UserName", "{0}") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                                
                                            </table>
                                            <br />
                                        </ItemTemplate>
                                        <ItemStyle BackColor="AliceBlue"  />
                                        <HeaderStyle BackColor="White" BorderColor="White" BorderWidth="1px" />
                                         </asp:TemplateField>
                                    <asp:ButtonField    HeaderStyle-BackColor="White"  
                                        ItemStyle-BackColor="AliceBlue" CommandName="View" 
                                        Text="View Details" ItemStyle-CssClass="TitleStyle" >
                                    <HeaderStyle  BackColor="White"  BorderColor="White" />
                                    <ItemStyle BackColor="AliceBlue" />
                                    </asp:ButtonField>
                                </Columns>
                                <EmptyDataTemplate>
                                    <table class="databoundStyle">
                                        <tr>
                                            <td >
                                                <asp:Image ID="img_Picture" runat="server" Height="117px" Width="112px" />
                                            </td>
                                            <td>
                                                <asp:Label ID="lbl_MaterialName" runat="server"></asp:Label>
                                               
                                                <asp:Label ID="lbl_Category" runat="server"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                        </tr>
                                    </table>
                                </EmptyDataTemplate>
                            </asp:GridView>
                            <asp:SqlDataSource ID="SqlIELTSdata" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                                ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                                
                                SelectCommand="SELECT [ID], [MaterialName], [Description], [Category], [File], [Picture], [Stars], [VisitedCount], [UserName] FROM [MaterialCollection]">
                            </asp:SqlDataSource>
                        </asp:Panel>
                    </td>
                </tr>
                
                </table>
        </td>
        <td class="RSSSide"  valign="top">
            <table class="style13" rules="none">
                <tr>
                    <td class="style14">
                        &nbsp;</td>
                    <td valign="top" class="style15">
                       
                        <table class="table2width">
                            <tr>
                                <td class="imagewidth">
                                    <asp:Image ID="Image2" runat="server" Height="35px" 
                                        ImageUrl="~/images/2903816497_45090decb8.jpg" Width="37px" />
                                </td>
                                <td class="rssstyle">
                                    <asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl="~/RSS1.aspx">RSS 
                                    Feed for recently added IELTS Materials</asp:LinkButton>
                                </td>
                            </tr>
                        </table>
                       
     <asp:GridView ID="GridView2"   runat="server"  
            DataSourceID="XmlDataSource2" AutoGenerateColumns="False" 
                            AllowPaging="True" PageSize="1" Width="100%" BorderColor="Silver" 
                            BorderStyle="Dashed" >
                            <Columns>
                                <asp:TemplateField>
                                
                                <ItemTemplate>
                <%#XPath("title")%><br />
                <%#XPath("pubDate")%><br />
                <%#XPath("author")%><br />
                <%#XPath("description")%>
            </ItemTemplate>
                                
                      <HeaderTemplate  ><h1 class="HeadingStyle" style="background-color:#1e3557" ></h1> </HeaderTemplate>           
                                
                                </asp:TemplateField>
                                
                            </Columns>
                        </asp:GridView>
         <asp:XmlDataSource ID="XmlDataSource2" runat="server" DataFile="http://feeds.feedburner.com/Ielts-blog"
            XPath="rss/channel/item"></asp:XmlDataSource>
                       
                    </td>
                </tr>
            </table>
        </td>
        <td class="sides">
            &nbsp;</td>
    </tr>
    </table>
</asp:Content>
